package com.think.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.baomidou.mybatisplus.plugins.Page;
import com.think.pojo.SysUser;
import com.think.service.ISysUserService;

@Controller
@RequestMapping("user")
public class SysUserController extends BaseController {
	@Autowired
	private ISysUserService userService;
	
	@RequestMapping(value={"","/","list"})
	public String index(Model model,SysUser user,@RequestParam(name = "current", defaultValue = "1") int current,
			@RequestParam(name = "size", defaultValue = "20") int size){
		Page<SysUser> page = new Page<SysUser>(current, size);
		page = userService.selectPage(page, user);
		model.addAttribute(PAGE, page);
		return "user/list";
	}
}
